import request from '@/utils/request'
import { member } from "api/baseUrl"
const role = member + '/role'
const resource = member + '/resource'
// 角色分页
export function rolesPageList(data) {
  return request({
    url: role + '/getPageList',
    method: 'post',
    data
  })
}

// 全部资源权限列表查询
export function getResourceAll(data) {
  return request({
    url: resource + '/getAllList',
    method: 'post',
    data
  })
}

// 角色资源权限查询
export function getRoleResourceList(params) {
  return request({
    url: role + '/getRoleResourceList',
    method: 'get',
    params
  })
}

// 角色
export function rolesAllList(data) {
  return request({
    url: role + '/getAllList',
    method: 'post',
    data
  })
}

// 角色删除
export function roleDel(params) {
  return request({
    url: role + '/del',
    method: 'get',
    params
  })
}

// 角色新增
export function roleAdd(data) {
  return request({
    url: role + '/add',
    method: 'post',
    data
  })
}

// 角色编辑
export function roleUpdate(data) {
  return request({
    url: role + '/update',
    method: 'post',
    data
  })
}



